package org.tank.sigleton;

/**
 * 单例饿汉式
 */
public class EMode {

    public  static  EMode eMode=new EMode();
    private EMode(){

    }
    public static EMode getInstance(){
        return eMode;
    }


    public static void main(String[] args) {


        for (int i = 0; i <100 ; i++) {
        new  Thread(()->{

            EMode instance = EMode.getInstance();
            System.out.println(instance.hashCode());

        }).start();
        }

    }



}
